from tinyshop_ui.common.webd import common_webd
class common_login:
    def __init__(self):
        self.webd = common_webd().webd
        self.webd.get('http://192.168.0.235/TinyShop_v2.4/index.php?con=admin&act=login')
        self.webd.implicitly_wait(2)
        self.webd.maximize_window()
        loginls = ['admin','123456','aaaa']
        putmsg = self.webd.find_elements_by_tag_name('input')
        for i in range(len(putmsg)):
            if putmsg[i].get_attribute('type') != 'submit':
                putmsg[i].send_keys(loginls[i])
            else:
                putmsg[i].click()
                break
